package com.collection;

import java.util.ArrayList;
import java.util.List;

public class ArrayListContainsExample {
    private List<zhang> list = new ArrayList<zhang>();

    public ArrayListContainsExample() {
        list.add(zhang.zhang);
        list.add(null);
    }
    

    public static void main(String[] args) {
        ArrayListContainsExample demo = new ArrayListContainsExample();

        //
        // Check to see if the list contains "Item 1".
        //
        demo.findItemInTheList(zhang.dong);

    }

    private void findItemInTheList(zhang itemToFind) {
        if (list.contains(itemToFind)) {
            System.out.println(itemToFind + " was found in the list");
        } else {
            System.out.println(itemToFind + " was not found in the list");
        }
    }
}

enum zhang{
	zhang, dong;
}